<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp" %>	
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
label{
	width:150px;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- css js-->
	
<title>字典子项管理</title> 
</head>
<body>
<div class="easyui-panel" border=false style="padding: 10px 20px;width:260px">
			<form id="formId" method="post" action="${ctx}/BscDicCode/saveItem"
				data-options="novalidate:false">
					   <input type="hidden" name="itemId" value="${vo.itemId}" />	
					   <input type="hidden" name="typeCode" value="${vo.typeCode}" />
		 <table>
		 <tr>
		 <td>类型名称：</td>
		 <td><input type="text" name="ptypename" size="30" maxlength="50" class="easyui-textbox" 
					data-options="required:true,width:'120px',disabled:true" value="${ptypename}" /></td>
					</tr>
		
		 <tr>
		  <td>子项编号：</td>
		 <td><input type="text" name="itemCode" size="30" maxlength="50" class="easyui-textbox" 
					data-options="required:true,width:'120px'" value="${vo.itemCode}" /></td>
				
		 </tr>
		 <tr>
		 <td>名称：</td>
		 <td><input type="text" name="itemName" size="30" maxlength="50" class="easyui-textbox" 
					data-options="required:true,width:'120px'" value="${vo.itemName}" /></td>
					</tr>
		 <tr>
		 
		 <td>创建人：</td>
		 <td><input type="text" name="itemCreater" size="30" maxlength="50" class="easyui-textbox" 
					data-options="width:'120px'" value="${vo.itemCreater}" /></td>
					</tr>
		 <tr>
		 <td>描述：</td>
		 <td><input type="text" name="itemMemo" size="30" maxlength="50" class="easyui-textbox" 
					data-options="width:'120px'" value="${vo.itemMemo}" /></td>
					</tr>
					
						<tr>
     			<td colspan="2" align="center" style="padding-top: 10px;">
	     			<a href="javascript:void(0)" class="easyui-linkbutton"
						iconCls="icon-remove" onclick="baseReset('formId')">重置</a> 
					<a href="javascript:void(0)" class="easyui-linkbutton"
						iconCls="icon-save" onclick="submitForm('formId','dg','win')">提交</a> 
					<a href="javascript:void(0)" class="easyui-linkbutton"
						iconCls="icon-cancel" onclick="clearForm('win')">取消</a>
     			</td>
     		</tr>
		 </table>
		 </form>
</div>

<script type="text/javascript">
function submitForm(fid, gid, wid) {
	$('#' + fid).form('submit', {
		onSubmit : function() {
			return $(this).form('enableValidation').form('validate');
		},
		success : function(data) {
			var data = eval('(' + data + ')');
			if (data) {
				if (data.success==true) {
					showMsg('提示', data.message);
					if (gid && gid != '') {
						$('#' + gid).datagrid({});
					}
					if (wid && wid != '') {
						$('#' + wid).window('close');
					}
				} else {
					showMsg('提示', data.message);
				}
			} else {
				showMsg('提示', '操作失败！');
			}
		}
	});
}
</script>
	
</body>
</html>